In June the actual sunset (sun goes below the horizon) will be just before 10:00pm. Obviously it will start getting dark before the actual sunset.
The view at sunset should be good, but note that the view after dark is disappointing. So timing is important, you don't want to miss the sunset, but if you get there at 8pm, you'll have a 2 hour wait until sunset.
Booking tickets in advance is not required.
You may want to look at their website and think further about whether you would prefer to buy a ticket online. (google montparnasse tower for their website).
Regarding the neighborhood, since you're only in Paris 4 days (it will pass quickly), IMO your time is better spent in other parts of the city (and not in the Montparnasse neighborhood)--except for the view around sunset from the Tower.
You could do what Philip suggested.