Unless the late Mr. Crooks jotted down a manifesto or otherwise is discovered to reveal his motive, we're not going to know, and are only able to guess at why he shot at Trump. Let me repeat that: We can only guess and will never know unless we get really lucky.
(One of my favorite details of a shooter incident was Adam Lanza's favorite video game obsession, Dance Dance Revolution since it was still a common opinion that video games trained rampage killers. Tastes in video games and music are about as useful as needing to impress Jodie Foster, or reread The Catcher In the Rye. You may be a lover, Adam, but you ain't no dancer.)
Crooks' choice of weapon (an AR-15–style rifle ) indicates a weapon of convenience. He didn't have the time or means to get something that was more suited to the task. This fits more the profile of a radicalized civilian than a trained operative.
When Al-Qaeda wanted to attack a target (or CIA, or IRA, or any other active group trying to influence a theater of conflict) they'd look at the suicide demographics. What young people are killing themselves in high numbers. Then, in the internet age, it's a matter of finding people who are self-radicalized, who want to express their outrage violently. And then its a matter of grooming that person (in this case very much the way predators groom children) to see the target of interest as the site / VIP / venue of the terror action. The rampage killer / saboteur / terrorist never knows who he's working for or what his cause is, only that by suicide bombing at this site, he'll be heard and known.
Is this to say Crooks was pointed at killing Trump by CIA? Not at all. Trump is an easy viable target, and there are plenty of reasons to be pissed off at him that make sense. But the reason that Crooks had to express his discontent violently has likely very little to do with Trump directly, and whether he's left-wing and wants to stop the US' descent into one-party autocracy, or he's far-right wing and thinks Trump is selling out isn't why he's shooting.
There are however, droves of pre-radicalized war boys in the US, silver paint in hand wanting an opportunity to be witnessed all shiny and chrome into Valhalla. A lot of them can be seen in the alt-right, the incels, the MGTOWs the alpha-male wannabes who have been entirely disregarded since they were teens without explanation or education, and are expected by society to either magically turn into high-paid salarymen, or suffer as losers in a single-occupant dwelling in a dead-end job where they're overworked and underpaid. This lot tends to be a bit dissatisfied with their lot in life.
I'm not saying Crooks is one of these guys, only that it's a big circle on the Venn-diagram, and not a difficult target to fall into. This circle not only has a higher-than-average male suicide rate (which is already high in the general population) but also is where pro-trump militants and the transnational white power movement gets its recruits. And they tend to register Republican.
Again, we don't know, only this might inform our guesses.