In The Godfather, why isn't Fredo at Vito Corleone's funeral?
Well, at the time of Don Vito Corleone's death by heart failure, Fredo had been sent off to Las Vegas to begin the process of securing the family real estate and business(es) as well as ensuring that local politicians and senior police are either bought, or otherwise neutered. It is the new Godfather's decision that the family should move to Vegas and away from the troubles (other families and drugs) of New York.
As we all know, the real reason Fredo was sent, was because he was the least missed of all of the family, being the weakling, both in body and mind.
As to why he wasn't at his father's funeral, well the number one reason had to be simple: Michael didn't want him there. He had previously shown himself a coward and weakling (again) in his fumbling the job of protecting his own father during the previous attempted assassination. Not only did he miss spotting the assassins, he fumbled his gun AND just sat there crying.
Michael had already been alerted that he needed to be wary and watchful at the funeral, to spot which of his men seemed chummy with the enemy, the Barzini's, and in fact it was Tessio who brokered the (fake) peace attempt, so Michael knew not to trust Tessio from that point forward.
If Michael had allowed Fredo to attend, it would have been more likely that Fredo would have created a scene, emotionally, and embarrass the family, and more importantly, ruin Michael's opportunity to catch out the REAL traitor, Tessio.
At that point, Michael didn't know the extent of Fredo's issues at being 'left out' and that he was becoming what would be an even worse traitor.