We left for YNP on a Saturday morning in May (the best time to visit) it was a 4 hour drive to the front entrance - keep in mind, the park has a limit on visitors, we arrived around noon and waited for about an hour to get in. I recommend arriving early (8, 9am). Entrance info can be found here.
Where we stayed: Rush Creek Lodge - highly recommend this lodge if you're not into the camping scene (like my bf) and still want the "city getaway" (or if you don't have a camping permit). This place offers indoor and outdoor games, bar area and dining, natural springs pool and hot-tub. We actually spent more time here on our first day!
On Sunday, we woke up at 5am for a sunrise hike. If you can, start your day as early as possible to beat the crowds. Upper Yosemite Valley trail took about 6 hours total, but would have taken longer if there were people on the trail. Not to mention, the scenery is beautiful - theres nothing like watching the sun rise over the valley.
This app saved my life - REI Co-op National Parks Guide - download to your phone BEFORE entering the park. It'll give you the best suggestions for trails, hikes, restrooms, natural springs, photography spots and so much more. It also tracks you so you never have to worry about getting lost!