Sure, the Edinburgh Castle tour is self-guided, so they could spend as little or as long of a time there as they want. There's a lot of military history there, so if they're like most guys, they'll probably enjoy that, but they do need to book ahead and tickets go fast, so they should definitely book as soon as possible.
I would also suggest walking to the top of Calton Hill, where they can get a beautiful panoramic view of the whole city. It's really gorgeous there.
And of course they should walk the Royal Mile and just check out all the shops and pubs, but also check out the Closes, which are historic, narrow alleyways or passages that leads off a main street into hidden courtyards. The most well known is the Real Mary King’s Close, which is a preserved 17th-century underground street beneath the Royal Mile. It's known for its myths of plague outbreaks, and reputation for being haunted.
If they're Harry Potter fans, they might want to visit Greyfriars, which is a very cool and very spooky cemetery. Once there, they should look for the grave of Thomas Riddle, where JK Rowling got the name for her villain in the book. All they need to do is input "Tom Riddle's grave Greyfriars" in Google, and it will lead them to the grave site. And if they look at the huge building on the other side of the fence in the back, they will see the inspiration for Hogwarts. JK Rowling actually wrote much of her first book at a nearby local cafe (now closed). They can also see the grave of Greyfriars' Bobby, a staunch and loyal little dog who watched over his master's grave for over 14 years there. It's a very touching sight.
Nearby is Sandy Bell, a local pub where you can find live music in the evening. They don't serve much food, although they do have a few appetizers, but it's mostly known for just drinking and gathering with friends.
A good place to eat is Berties' Proper Fish & Chips, which has really good fried haddock and chips, and also good beer. It's located on Victoria Street, which is a picturesque street to visit.
I also enjoyed the National Museum of Scotland, which has some very interesting exhibits there, including Dolly, the first cloned sheep. And it's free, which is nice. It's located right in the city center, so it's easy to get to. Because it's free, they could pop in for as little or as long as they want to.
Overall, though, with just a day there, I would focus on the things that they really want to see based on their interests. They should definitely just walk around and check things out because that's what is so fun in Edinburgh. It has such an interesting vibe.