There is a deleted scene from the theatrical release of Star Wars in which the rebel leader expresses some skepticism over whether Luke can fly an X-wing. But Biggs Darklighter, Luke's friend from Tatooine, vouches for him.
LEADER: You sure you can handle this ship?
BIGGS: Sir, Luke is the best bush pilot in the Outer Rim Territories.
Apparently, when the scene was added to the 1997 special edition, they left off even more dialogue where one of the rebel leaders reveals he knew Luke's father. This has probably been retconned out of existence, but it would provide another reason he trusted Luke's abilities.
There is another scene added from the radio play that justifies the rebel leader's decision. Luke is made to fly in a simulation to prove his worth.
Leaving Leia to pacify an enraged Han, Luke joins Biggs Darklighter, who tests his flying abilities using a flight simulator. It is revealed by Commander Willard that Luke was only "killed" twice, despite Biggs pitting him against the virtual equivalent of the entire Imperial Starfleet. (Whether Willard was actually exaggerating or not is left for the listener to determine, though regardless Luke does well enough that the Rebels are willing to put him into a starfighter for the assault.)
As for why Luke was such a good pilot to begin with, I think the example of Luke's father Anakin is illustrative. In The Phantom Menace, Anakin jumps into a Naboo starfighter with R2D2 and is able to fly it because he has experience piloting racing pods. To at least some degree, it appears that flying land crafts on Tatooine prepares one for piloting small speedy starfighters. Keep in mind that Luke also has an astromech droid and targeting computers to fill in the gaps in his knowledge.
As for why they only sent 30 ships, I think that's just probably all they had. The number of ships sent in defense of the Hoth base was equally paltry.
Death Star
the Rebels had just lost 500 x-wings and their crews in an earlier attack on the Death Star. As such, I get the feeling they were pretty much throwing up anyone who had a hope in hell in being able to fly. As it happens, Luke (as referenced by Biggs in the extended edition) just happens to be an excellent pilot and also the only pilot capable of making the shot due to the Force.