There are actually several versions of the Lefschetz hyperplane theorem for singular varieties. The main point is that this is ultimately a Hodge theoretic statement, one proof is using the Kodaira-Akizuki-Nakano vanishing theorem to establish the analogous statement for the Hodge components of singular cohomology. 

Hartshorne proved that the usual statement holds if $X\setminus Y$ is smooth, in other words, if $Y$ contains the singular locus of $X$. See 4.3 of [this paper][1]. 

With the development of a sensible Hodge theory for singular varieties this has been further generalized. I am not sure whom to attribute the credit for this. You can find a version for the case when $X$ is a local complete intersection in III.3.12(iii) of [this volume][2].


  [1]: http://www.springerlink.com/content/x336284161121452/
  [2]: http://www.springer.com/mathematics/algebra/book/978-3-540-50023-0