You need let for len and n:
append [[a]] = [a | let len = length a, let n = 1, head a ++ (a !! n), n < len]
But this won't solve all of your problems, once the lets are added it doesn't typecheck, and [[a]] is probably not the pattern you want to use here. The pattern [[a]] will only match a list like [[1]], it won't match [], or [[1, 2]], or [[1], [2]].
You also have another problem that head a ++ (a !! n) should be an expression that returns a Bool, but in this case it's returning a list. Any "naked" expressions on the right side of the | in a list comprehension must evaluate to a Bool value.
If you're wanting to flatten a list of lists, I would suggest looking at the built-in concat function, which is actually defined using foldr. Folds can be tricky to learn, though, so I'll show an alternate definition using explicit recursion:
myconcat :: [[a]] -> [a]
myconcat [] = []
myconcat (x:xs) = x ++ myconcat xs
This is equivalent to the foldr definition, but hopefully it can be more instructive to how to solve this sort of problem.