Ryan Ranch is a great spot to watch the sunset while in Joshua Tree. It's a very short hike for a big reward.
If you're in Joshua Tree, this is a great spot for sunset. A short, maybe 1/2 mile hike to the old ranch from the parking lot. We stayed at Ryan Campground and just walked in from there, about the same distance. Make sure to bring your camera, especially if there are spotty clouds in the sky as the sun will light the clouds on fire about 10 minutes after it goes down.