This is a loaded question.
Unfortunately, good (or bad) design is 100% dependent on how it is going to be used.
As a rule of thumb, it is a good idea to keep member variables private, just so that the Object model is in control of their access. This implies the first approach is better.
BUT
if the values never change, what's the point? Why bother writing setters if they will never be used?
So, which one is better? As I mentioned above, that depends on what you are doing this for. If it's for an assignment for class, I would go with the first one. Your teacher will like that more, as it is more "textbook".
So, if this is a personal project or for work where you can take advantage of future releases, I would go with a cross between the two:
public class Student{
private final String name;
private final String id;
public Student(String name, String id){
this.name = name;
this.id = id;
}
... getters ONLY for both fields
This approach is safe, because the member fields are private, and there isn't the "code smell" of unused methods. This is also fairly extensible, as you can quite easily add the setters if your requirements ever change and you need to modify the fields.