I got a D in Ap Lang

Will I still graduate if I got a D in AP Lang in California?

According to the California Education department, you need 3 years of English as a California HS student to graduate. I would check with HS counselor to confirm their policy. However, if you have been accepted to a college, the D could be a reason for possibly rescinding your acceptance since many require 4 years of English.

https://www.cde.ca.gov/ci/gs/hs/cefhsgradreq.asp

For high school graduation, check if a D grade counts as (barely) passing for the purpose of fulfilling requirements for your high school graduation, or if that semester/year of English is necessary at your high school.

However, a D grade will endanger your college admission.

Can I take summer courses for senior year or should I take it junior to make up the grade?

So you are a Junior? Definitely retake the course this summer before college application season.